package safeCommitter.test.finder.simple;

import java.util.HashSet;
import java.util.Map;
import java.util.Set;

import org.eclipse.jdt.core.IMethod;

import safeCommitter.model.MMethod;
import safeCommitter.model.adpters.SCSingleMethodTest;
import safeCommitter.test.finder.core.ISCMethodRepository;

public class SCMethodRepository implements ISCMethodRepository {

	private final Set<IMethod> searchedMethods = new HashSet<IMethod>();

	public final Set<IMethod> methodCalledSet = new HashSet<IMethod>();

	private final Set<SCSingleMethodTest> testCalledSet = new HashSet<SCSingleMethodTest>();

	public Set<IMethod> getSearchedMethods() {
		return searchedMethods;
	}

	public Set<SCSingleMethodTest> getTestCalledSet() {
		return testCalledSet;
	}

	public void addTest(final SCSingleMethodTest test) {
		getTestCalledSet().add(test);
	}

	public void addSearchedMethod(final IMethod m) {
		getSearchedMethods().add(m);
	}

	public void addCalledMethod(final IMethod method) {
		methodCalledSet.add(method);
	}

	public Boolean alreadySearched(final IMethod m) {
		return getSearchedMethods().contains(m);
	}

	public void addSearchedMethods(final Set<IMethod> methods) {
		getSearchedMethods().addAll(methods);
	}

	public Set<IMethod> getMethodsToCheck() {
		return methodCalledSet;
	}

	public void removeMethodsFromMap(final Set<IMethod> methods) {
		for (IMethod m : methods)
			getMethodsToCheck().remove(m);
	}

	public Set<MMethod> addTestCallee(final SCSingleMethodTest t) {
		return null;
	}

	public void setTestCalledMap(final Map<SCSingleMethodTest, Set<MMethod>> testCalledMap) {
	}

	public Map<SCSingleMethodTest, Set<MMethod>> getTestCalledMap() {
		return null;
	}

	public void setMethodCalledMap(final Map<IMethod, Set<MMethod>> methodCalledMap) {
	}

	public Map<IMethod, Set<MMethod>> getMethodCalledMap() {
		return null;
	}

	public void addMethodCallees(final IMethod method, final Set<MMethod> callees) {
	}

	public void addTestCallees(final SCSingleMethodTest test, final Set<MMethod> callees) {
	}

	public void addTestCallee(final SCSingleMethodTest test, final MMethod callee) {
	}

	public Set<MMethod> addMethodCallee(final IMethod method) {
		return null;
	}

	public Set<MMethod> addMethodCallee(final IMethod method, final MMethod callee) {
		return null;
	}

}
